package com.manor.main.fragment.community

import android.content.Intent
import android.graphics.Rect
import android.os.Bundle
import android.os.SystemClock
import android.util.Log
import android.view.View
import android.widget.FrameLayout
import android.widget.ImageView
import android.widget.TextView
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.alibaba.fastjson.JSON
import com.chad.library.adapter.base.listener.OnItemChildClickListener
import com.scwang.smart.refresh.layout.api.RefreshLayout
import com.scwang.smart.refresh.layout.listener.OnRefreshLoadMoreListener
import com.manor.common.CommonAppConfig
import com.manor.common.Constants
import com.manor.common.activity.AbsActivity
import com.manor.common.custom.DrawableTextView
import com.manor.common.http.CommonHttpUtil
import com.manor.common.http.HttpCallback
import com.manor.common.http.PitUtil
import com.manor.common.utils.ClickUtil
import com.manor.common.utils.KLog
import com.manor.common.utils.ToastUtil
import com.manor.common.utils.WordUtil
import com.manor.dynamic.activity.AbsDynamicActivity
import com.manor.dynamic.activity.DynamicDetailsActivity
import com.manor.dynamic.bean.CommunityDynamicBean
import com.manor.dynamic.event.DynamicDelEvent
import com.manor.dynamic.event.SubmitDynamiFinish
import com.manor.dynamic.http.DynamicHttpConsts
import com.manor.dynamic.http.DynamicHttpUtil
import com.manor.dynamic.views.AudioMp3View
import com.manor.main.R
import com.manor.main.activity.UserCenterActivity
import com.manor.main.adapter.NewFollowAdapter
import com.manor.main.custom.AutoDismissDialog
import com.manor.main.http.MainHttpUtil
import com.tencent.rtmp.ITXVodPlayListener
import com.tencent.rtmp.TXLiveConstants
import com.tencent.rtmp.TXVodPlayConfig
import com.tencent.rtmp.TXVodPlayer
import com.tencent.rtmp.ui.TXCloudVideoView
import kotlinx.android.synthetic.main.fragment_follow.*
import org.greenrobot.eventbus.EventBus
import org.greenrobot.eventbus.Subscribe
import org.greenrobot.eventbus.ThreadMode
import java.util.*

/**
 * 关注
 */
class NewFollowFragment : CommunityBaseFragment() {

    private var firstVisibleItem = 0
    private var lastVisibleItem = 0
    private var visibleCount = 0
    lateinit var communityDynamicAdapter :NewFollowAdapter;
    private var my_position: Int = 0
    var is_shuaxin: Boolean = true;
    private var mPlayer : TXVodPlayer? = null
    var flvUrl :String = "";
    internal var pageNum = 1
    private var lastonclickTime: Long = 0//全局变量
    private var time: Long = 0
    private var cityRefresh: Boolean = false


    companion object{
        fun newInstance(): NewFollowFragment {
            val args = Bundle()

            val fragment = NewFollowFragment()
            fragment.arguments = args
            return fragment
        }
    }

    override fun onSetLayoutId(): Int {
        return R.layout.fragment_follow
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        mPlayer = TXVodPlayer(activity)

        EventBus.getDefault().register(this)
        initRecyclerView()
    }
    override fun onResume() {
        super.onResume()

        if (!cityRefresh) {
            if (srl_follow != null) {
                srl_follow.autoRefresh()
            }
            cityRefresh = true
        }
    }

    override fun setUserVisibleHint(isVisibleToUser: Boolean) {

        if (mContentView == null) {
            return
        }

        if (isVisibleToUser) {// 不在最前端显示 相当于调用了onPause();
            time = SystemClock.uptimeMillis()//局部变量
            if (time - lastonclickTime <= 6000) {
                KLog.e("TAG", "时间未到")
                return
            }
            lastonclickTime = time
            getAttentionDynamic()
        } else {
            if (!cityRefresh) {
                mPlayer?.stopPlay(true)
                flvUrl = ""
                rl_community_audio?.stopVoice()
            }

        }

    }
    fun gettop() {
        rv_view.smoothScrollToPosition(0);

    }
    fun stopVoice (){
        mPlayer?.stopPlay(true)
        flvUrl = ""
        if (null!=rl_community_audio&&null!=rl_community_audio?.getTag()) {
            rl_community_audio?.stopVoice()
            rl_community_audio?. resetView()
            rl_community_audio?. release()
        }
    }

    //发布动态后更新当前的动态
    @Subscribe(threadMode = ThreadMode.MAIN, sticky = true)
    fun updateDate(submitDynamiFinish: SubmitDynamiFinish?) {
        if (submitDynamiFinish != null) {
            val i = submitDynamiFinish.i
            Log.i("刷新下.", "..................i.......................")
            srl_follow.autoRefresh()
        } else {
            Log.i("刷新下.", ".............没有数据...........................")
        }
    }

    //用户删除动态后 刷新当前页面
    @Subscribe(threadMode = ThreadMode.MAIN)
    fun onDynamicDel(e: DynamicDelEvent?) {
//        Logger.i("cityFragment-刷新当前页面")
//        if (e != null) {
//            srl_follow.autoRefresh()
//        }
    }
    private fun initRecyclerView() {
        rv_view.setLayoutManager(LinearLayoutManager(activity, LinearLayoutManager.VERTICAL, false))
        srl_follow.setHeaderTriggerRate(0.1f)
        srl_follow.setHeaderMaxDragRate(1f)
        srl_follow.setHeaderHeight(60f)

        communityDynamicAdapter = NewFollowAdapter(null)
        rv_view.adapter = communityDynamicAdapter

        communityDynamicAdapter.setIOnclickListener(object : NewFollowAdapter.NewCircrle {
            override fun clickVideo(container: FrameLayout, videoGroup: View, playView: TXCloudVideoView, img : ImageView, w:Int, h:Int) {
                (activity as AbsDynamicActivity).addPlayerGroups(container, videoGroup, playView,img,w,h)
                if (!playView.getTag().equals(flvUrl)) {
                    if (null != rl_community_audio && null != rl_community_audio?.getTag()) {
                        rl_community_audio?.stopVoice()
                    }
                    (activity as AbsActivity).showWaitingDialog(false)
                    val config = TXVodPlayConfig()
                    config.setCacheFolderPath(activity!!.getCacheDir().getAbsolutePath())
                    config.setMaxCacheItems(10)
                    mPlayer?.setConfig(config)
                    mPlayer?.stopPlay(true)
                    mPlayer?.setPlayerView(playView);
                    mPlayer?.setAutoPlay(true)
                    mPlayer?.isLoop = true
                    flvUrl = playView.getTag().toString()
                    mPlayer?.startPlay(flvUrl)
                    mPlayer?.setVodListener(object :ITXVodPlayListener {
                        override fun onNetStatus(p0: TXVodPlayer?, p1: Bundle?) {
                            (activity as AbsActivity).dismissWaitingDialog()
                        }
                        override fun onPlayEvent(p0: TXVodPlayer?, p1: Int, p2: Bundle?) {
                            KLog.e("tag",p1.toString())
                            when(p1) {
                                TXLiveConstants.PLAY_EVT_CHANGE_RESOLUTION->{
                                    (activity as AbsActivity).dismissWaitingDialog()
                                }
                                TXLiveConstants.PLAY_EVT_VOD_PLAY_PREPARED -> {//
                                    if (isVisible)
                                        mPlayer?.pause()
                                }
                            }
                        }

                    })
                } else {
                    mPlayer?.setPlayerView(playView);
                    mPlayer?.resume()
                }
            }

        })
        communityDynamicAdapter.setOnItemClickListener { adapter, view, position ->
            if (ClickUtil.canClick()) {
                my_position = position

                val intent = Intent(activity, DynamicDetailsActivity::class.java)
                intent.putExtra(Constants.DYNAMIC_BEAN, communityDynamicBeans[position])
                intent.putExtra("position", position.toString() + "")
                startActivityForResult(intent, 7)

            }
        }
        rv_view.addOnScrollListener(object : RecyclerView.OnScrollListener() {
            override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) {
                super.onScrollStateChanged(recyclerView, newState)
                if (newState == RecyclerView.SCROLL_STATE_IDLE) {

                        autoPlayVideo(recyclerView)

                    //   activity?.let { Glide.with(it).resumeRequests() };
                    KLog.e("tag", "停止滑动")


                } else {
                    //   activity?.let { Glide.with(it).pauseRequests() };
                    KLog.e("tag", "开始滑动")
                }

            }

            override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
                super.onScrolled(recyclerView, dx, dy)
                val layoutManager = recyclerView.layoutManager
                if (layoutManager is LinearLayoutManager) {
                    firstVisibleItem = layoutManager.findFirstVisibleItemPosition()
                    lastVisibleItem = layoutManager.findLastVisibleItemPosition()
                    visibleCount = lastVisibleItem - firstVisibleItem
                    val itemTotalCount = layoutManager.getItemCount()
                    val lastChildView = layoutManager.getChildAt(layoutManager.getChildCount() - 1)
                    if (lastChildView == null) return;
                    val lastChildBottom = lastChildView.bottom
                    val recyclerBottom = recyclerView.bottom
                    if (lastVisibleItem == itemTotalCount - 1 && lastChildBottom == recyclerBottom) {
                        if (is_shuaxin) {
                            is_shuaxin = false
                            pageNum++;
                            srl_follow.setEnableLoadMore(false);
                            KLog.e("getDynamicList", "自动加载");
                            getAttentionDynamic();
                        }
                    }


                }
            }
        })
        srl_follow.setEnableAutoLoadMore(false)
        srl_follow.setOnRefreshLoadMoreListener(object : OnRefreshLoadMoreListener {
            override fun onLoadMore(refreshLayout: RefreshLayout) {
                pageNum++

                getAttentionDynamic()
            }

            override fun onRefresh(refreshLayout: RefreshLayout) {
                pageNum = 1
                getAttentionDynamic();
            }
        })
        communityDynamicAdapter.addChildClickViewIds(R.id.tv_tip, R.id.tv_forward, R.id.tv_like, R.id.iv_love, R.id.iv_logo, R.id.tv_comment, R.id.rl_community_audio,R.id.im_gd)
        communityDynamicAdapter.setOnItemChildClickListener(itemChildClickListener)
        time = SystemClock.uptimeMillis()//局部变量
        if (time - lastonclickTime <= 6000) {
            KLog.e("TAG", "时间未到")
            return
        }
        lastonclickTime = time
        getAttentionDynamic()
    }
    override fun onPause() {
        super.onPause()
        mPlayer?.stopPlay(true)
        flvUrl = ""
        if (null!=rl_community_audio&&null!=rl_community_audio?.getTag()) {
            rl_community_audio?.stopVoice()
        }
    }

    override fun onInvisible() {
        super.onInvisible()
        mPlayer?.pause()
    }

    override fun onDestroy() {
        super.onDestroy()
        EventBus.getDefault().unregister(this)
        DynamicHttpUtil.cancel(DynamicHttpConsts.DYNAMIC_GETNEW)
    }
    private fun autoPlayVideo(recyclerView: RecyclerView?) {
        var is_ture = false
        for (i in 0 until visibleCount) {
            KLog.e("tag", "循环$i")
            if (recyclerView != null && recyclerView.getChildAt(i) != null) {
                if (recyclerView.getChildAt(i).findViewById<View>(R.id.video_view) != null) {
                    is_ture = true
                    val homeGSYVideoPlayer = recyclerView.getChildAt(i).findViewById<TXCloudVideoView>(R.id.video_view)

                    val rect = Rect()
                    homeGSYVideoPlayer.getLocalVisibleRect(rect)
                    val videoheight = homeGSYVideoPlayer.getHeight()
                    if (rect.top == 0 && rect.bottom == videoheight) {

                        if (mPlayer?.isPlaying == true && flvUrl.equals(homeGSYVideoPlayer.getTag().toString())) {
                            //如果视频正在播放并且url地址相同

                        } else {

                            if (null!=rl_community_audio&&null!=rl_community_audio?.getTag()) {
                                rl_community_audio?.stopVoice()
                            }
                            mPlayer?.stopPlay(true)
                            mPlayer?.setPlayerView(homeGSYVideoPlayer);
                            mPlayer?.setAutoPlay(true)
                            mPlayer?.isLoop = true
                            flvUrl = homeGSYVideoPlayer.getTag().toString()

                                mPlayer?.startPlay(flvUrl)

                            mPlayer?.setVodListener(object : ITXVodPlayListener {
                                override fun onPlayEvent(player: TXVodPlayer?, event: Int, param: Bundle?) {
                                    KLog.e("tag", event)
                                    if (event === TXLiveConstants.PLAY_EVT_PLAY_BEGIN) {
                                        homeGSYVideoPlayer.bringToFront()
                                    }
                                }

                                override fun onNetStatus(p0: TXVodPlayer?, p1: Bundle?) {
                                }
                            })
                        }
                        break
                    }
                }

//                if (null != recyclerView.getChildAt(i).findViewById<View>(R.id.rl_community_audio) && null != recyclerView.getChildAt(i).findViewById<View>(R.id.rl_community_audio).tag) {
//                        is_ture = true
//                        mPlayer?.stopPlay(true)
//                        rl_community_audio = recyclerView.getChildAt(i).findViewById<AudioMp3View>(R.id.rl_community_audio)
//                        rl_community_audio?.playVoice(recyclerView.getChildAt(i).findViewById<View>(R.id.rl_community_audio).tag.toString())
//                    communityDynamicAdapter.itemCount
//                    if(communityDynamicAdapter.itemCount<firstVisibleItem + i - 1){
//                        communityDynamicAdapter.getItem(firstVisibleItem + i - 1).setmVoicePlaying(true)
//                    }else{
//                        if(communityDynamicAdapter.itemCount<firstVisibleItem + i - 2){
//                            communityDynamicAdapter.getItem(firstVisibleItem + i - 2).setmVoicePlaying(true)
//                        }
//                    }
//
//                    break
//
//                }

            }
        }
        if (!is_ture) {
            if (null!=rl_community_audio&&null!=rl_community_audio?.getTag()) {
                rl_community_audio?.stopVoice()
            }
            mPlayer?.stopPlay(true)
        }
    }

    private var rl_community_audio = activity?.let { AudioMp3View(it, "") }
    private val itemChildClickListener = OnItemChildClickListener { adapter, view, position ->

        val id = view.id

        //    KLog.e("tag",communityDynamicAdapter.getItem(position).getUserinfo().getUser_nickname()+"/"+position);
        if (id == R.id.rl_community_audio) {
            if (null!=rl_community_audio&&null!=rl_community_audio?.getTag()) {
                rl_community_audio?.stopVoice()
            }
            mPlayer?.stopPlay(true)
            flvUrl = ""
            if (communityDynamicAdapter.getItem(position).ismVoicePlaying()) {


                communityDynamicAdapter.getItem(position).setmVoicePlaying(false)
            } else {
                rl_community_audio=  view as AudioMp3View
                rl_community_audio?.playVoice(view.tag.toString())
                communityDynamicAdapter.getItem(position).setmVoicePlaying(true)


            }
        } else if (id == R.id.tv_tip) {//撩一下
            puulLedThe(communityDynamicAdapter.getItem(position).uid)
        } else if (id == R.id.tv_comment) {//请你发言

            my_position = position
            val intent = Intent(activity, DynamicDetailsActivity::class.java)
            intent.putExtra(Constants.DYNAMIC_BEAN, communityDynamicBeans[position])
            intent.putExtra("position", position.toString() + "")
            startActivityForResult(intent, 7)

        } else if (id == R.id.iv_love) {//关注
            //CommonHttpUtil.setAttention(communityDynamicBeanList.get(position).getUid(), null);
            setCommunityAttention(position)
        } else if (id == R.id.tv_like) {//点赞
            addLike(communityDynamicAdapter.getItem(position).id,
                    communityDynamicAdapter.getItem(position).uid, position, view)
        } else if (id == R.id.iv_logo) {//头像点击
            activity?.let {
                UserCenterActivity.forward(it, communityDynamicAdapter.getItem(position).uid)
            }

        }else if(id == R.id.im_gd){
//            arrayList.clear()
//            arrayList.add("举 报")
//            arrayList.add("取 消")
//            (activity as AbsDynamicActivity).showpop(view, arrayList, communityDynamicBeans[position].id)
            (activity as AbsDynamicActivity).setting(communityDynamicBeans[position])
        }
    }

//    private var mPopWindow: PopupWindow? = null
//    private var mAdapter: NewCirclePopAdapter? = null
    private val arrayList = ArrayList<String>()
//    private fun showpop(m_view: View, arrayList: List<String>) {
//        val contentView = LayoutInflater.from(activity).inflate(R.layout.dialog_pop_new_circle, null)
//        mPopWindow = PopupWindow(contentView,
//                ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, true)
//        mPopWindow?.setContentView(contentView)
//        val rv_newlistview = contentView.findViewById<RecyclerView>(R.id.rv_newlistview)
//        rv_newlistview.setHasFixedSize(true)
//        rv_newlistview.setLayoutManager(LinearLayoutManager(activity, LinearLayoutManager.VERTICAL, false))
//        mAdapter = NewCirclePopAdapter(R.layout.rv_new_circle_item, arrayList)
//        rv_newlistview.setAdapter(mAdapter)
//        if (mPopWindow?.isShowing()) {
//            mPopWindow?.dismiss()
//        } else {
//            mPopWindow?.showAsDropDown(m_view)
//        }
//        mAdapter?.setOnItemClickListener(OnItemClickListener { adapter, view, position ->
//            if(position==0){
//                DynamicReportActivity.forward(activity, dynamicBean.id)
//            }
//            mPopWindow?.dismiss()
//        })
//
//
//    }

    override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
        super.onActivityResult(requestCode, resultCode, data)
        if (requestCode == 7) {
            //            KLog.e("tag",communityDynamicAdapter.getItem(my_position).getUserinfo().getUser_nickname());
            try {
                communityDynamicAdapter.getItem(my_position).comments = data?.extras?.getString("second")
                communityDynamicAdapter.getItem(my_position).islike = data?.extras?.getString("islike")
                communityDynamicAdapter.getItem(my_position).likes = data?.extras?.getString("likes")
                communityDynamicBeans[my_position].comments = data?.extras?.getString("second")

                try {
                    val a = Integer.parseInt(data?.extras?.getString("islike"))
                    communityDynamicBeans[my_position].islike = a.toString()
                } catch (e: NumberFormatException) {
                    e.printStackTrace()
                }

                communityDynamicBeans[my_position].likes = data?.extras?.getString("likes")
                communityDynamicAdapter.notifyItemChanged(my_position + 1)
            } catch (e: NullPointerException) {

            }

        }
    }
    /**
     * 关注
     */
    private fun setCommunityAttention(position: Int) {
        CommonHttpUtil.setCommunityAttention(communityDynamicAdapter.getItem(position).uid,
                object : HttpCallback() {
                    override fun onSuccess(code: Int, msg: String, info: String) {
                        if (code == 0) {
                            val result = PitUtil.strGetFirst(info)

                            val obj = JSON.parseObject(result)
                            //                    EventBus.getDefault().post(new DynamicLikeEvent(dynamicBean.getId(), obj.getIntValue("islike"), obj.getString("nums")));
                            val isattent = obj.getInteger("isattent")
                            communityDynamicAdapter.getItem(position).isattent = isattent
                            communityDynamicAdapter.notifyItemChanged(position)
                        } else {
                            ToastUtil.show(msg)
                        }
                        communityDynamicAdapter.notifyItemChanged(position)
                    }
                })
    }

    /**
     * 撩一下
     */
    private fun puulLedThe(uid: String) {
        MainHttpUtil.pulledThe(uid, object : HttpCallback() {
            override fun onSuccess(code: Int, msg: String, info: String) {
                if (code == 0) {
                    val inflater = layoutInflater
                    val view1 = inflater.inflate(R.layout.dialog_tips_layout, null)
                    val textView = view1.findViewById<TextView>(R.id.tv_dialog_context)
                    textView.text = "成功撩了一下！"
                    context?.run {
                        val dialog = AutoDismissDialog(this, R.style.DialogStyleTips)
                        dialog.setContentView(view1)
                        dialog.setCanceledOnTouchOutside(true)
                        dialog.show()
                    }


                } else {
                    ToastUtil.show(msg)
                }
            }
        })
    }

    //点赞
    private fun addLike(id: String, uid: String, position: Int, view: View) {
        if (uid == CommonAppConfig.getInstance().uid) {
            ToastUtil.show(WordUtil.getString(com.manor.dynamic.R.string.video_comment_cannot_self))
            return
        }
        DynamicHttpUtil.addLike(id, object : HttpCallback() {
            override fun onSuccess(code: Int, msg: String, info: String) {
                if (code == 0) {
                    val result = PitUtil.strGetFirst(info)
                    val obj = JSON.parseObject(result)
                    //EventBus.getDefault().post(new DynamicLikeEvent(dynamicBean.getId(), obj.getIntValue("islike"), obj.getString("nums")));
                    val islike = obj.getIntValue("islike")
                    val nums = obj.getString("nums")
                    communityDynamicAdapter.getItem(position).islike = islike.toString() + ""
                    communityDynamicAdapter.getItem(position).likes = nums
                    communityDynamicBeans[position].islike = islike.toString()
                    communityDynamicBeans[position].likes = nums
                    //    communityDynamicAdapter.notifyItemChanged(position+1);
                    val tv_name = view as DrawableTextView
                    if ("1" == communityDynamicAdapter.getItem(position).islike) {
                        tv_name.leftDrawable = activity?.getDrawable(R.mipmap.icon_up)
                        tv_name.text = nums
                    } else if ("0" == communityDynamicAdapter.getItem(position).islike) {
                        tv_name.leftDrawable = activity?.getDrawable(R.mipmap.icon_unup)
                        tv_name.text = nums
                    }
                } else {
                    ToastUtil.show(msg)
                }
            }
        })
    }


    /**
     * 用于 获取动态列表
     */
        private fun getAttentionDynamic() {
            var lastid = ""
            if (pageNum > 1 && communityDynamicAdapter.data.size > 1) {
                lastid = communityDynamicAdapter.data.get(communityDynamicAdapter.data.size - 1).getId()
            }
            DynamicHttpUtil.getAttentionDynamic(pageNum, lastid, object : HttpCallback() {
                override fun onSuccess(code: Int, msg: String, info: String) {
                    KLog.e("getDynamicList", "拿到数据$pageNum")
                    setDate(code, msg, info)
                    srl_follow?.setEnableLoadMore(true)
                    srl_follow?.setEnableRefresh(true)
                    is_shuaxin = true
                }

                override fun onError() {
                    srl_follow?.setEnableLoadMore(true)
                    srl_follow?.finishLoadMore()
                    srl_follow?.finishRefresh()
                    if (pageNum > 1) {
                        pageNum--
                    }
                    is_shuaxin = true
                    ToastUtil.show("网络请求失败")
                    super.onError()
                }
            })
        }

        var communityDynamicBeans: MutableList<CommunityDynamicBean> = ArrayList();
        private fun setDate(code: Int, msg: String, info: String) {
            if (code == 0) {
                if (info.isNotEmpty()) {
                    if (pageNum > 1) {//加载
                        val communityDynamic = JSON.parseArray(info, CommunityDynamicBean::class.java)
                        communityDynamicAdapter.addData(communityDynamic)
                        communityDynamicBeans.addAll(communityDynamic)
                        srl_follow?.finishLoadMore()
                    } else {//刷新
                        if (communityDynamicBeans.size > 0) {
                            communityDynamicBeans.clear()
                        }

                        val communityDynamic = JSON.parseArray(info, CommunityDynamicBean::class.java)
                        communityDynamicBeans.addAll(communityDynamic)
                        communityDynamicAdapter.setNewInstance(communityDynamic)

                        //                    communityDynamicAdapter.setNewInstance(communityDynamicBeanList);
                        srl_follow?.finishRefresh()
                    }
                } else {
                    srl_follow?.finishLoadMore()
                    srl_follow?.finishRefresh()
                    srl_follow?.finishLoadMoreWithNoMoreData()
                }
            } else {
                srl_follow?.finishLoadMore()
                srl_follow?.finishRefresh()
                ToastUtil.show(msg)
            }
        }



  


        override fun bindEvent() {
    }
    override fun onClick(v: View?) {
    }
    override fun initData() {
    }
    override fun initImmersionBar() {
    }
    override fun immersionBarEnabled(): Boolean {
        return false
    }
    override fun initView() {
    }
}